class CreateEvents < ActiveRecord::Migration
  def self.up
    create_table :events do |t|
      t.string  :passwd , :null => false
      t.string  :status, :null => false, :default => 'draft'
      t.string  :type_name
      t.string  :name, :null => false
      t.datetime :start_time
      t.datetime :end_time
      t.string  :place
      t.string  :address
      t.column  :point, :geometry, :null => false
      t.string  :description
      t.string  :equipments 
      t.string  :url
      t.string  :hash_tag
      t.string  :memo
      t.integer :score ,:default => 0
      t.timestamps :create_at, :null => false
      t.timestamps :updated_at, :null => false
    end
  end

  def self.down
    drop_table :events
  end
end
